OCRSetLanguageFilePath

Sets the path to the language file to use when reading an image using OCR. Use to override the default OCR language setting in the playback options, which may help improve the accuracy of returned text. See Troubleshooting OCR issues.

Note: QA Wizard Pro uses the Tesseract OCR engine. QA Wizard Pro includes the English language file (eng.traineddata). If you need to test other languages, download additional language files from Tesseract. Language files must be stored in a directory named tessdata.

Syntax

OCRSetLanguageFilePath("FilePath")

Arguments

Argument Description
FilePath Full path to the language file.

Example

'Saves default OCR settings

lang = OCRGetLanguageFilePath()

contrast = OCRGetContrast()

imgScale = OCRGetScale()

grayConversion = OCRIsConvertingToGrayscale()

Try

'Changes OCR settings for the checkpoint

OCRSetLanguageFilePath("C:\\tessdata\\MICR.traineddata")

OCRSetContrast(50)

OCRSetScale(2)

OCRConvertToGrayscale(True)

'Verifies text in the page footer

Window("ACME Bank").OCRCheckpoint(92, "ACME Bancorp, Member FDIC", 13, 4, 86, 11, False, "Footer text is incorrect")

Finally

'Resets default OCR settings

OCRSetLanguageFilePath(lang)

OCRSetContrast(contrast)

OCRSetScale(imgScale)

OCRConvertToGrayscale(grayConversion)

End Try